ci: orchestrated one-click release to pub.dev#101
Merged
Conversation
Add a manual workflow_dispatch release that publishes every package whose pubspec version is not yet on pub.dev, in dependency order (solid_annotations then solid_generator), skipping already-published versions. scripts/release.sh reads each pubspec version (source of truth; no version bumping), skips versions already on pub.dev, creates a GitHub Release + tag (<name>-v<version>) to trigger publish.yml, and waits for pub.dev to serve the new version before releasing dependents. Supports a dry_run input. Requires a RELEASE_PAT secret: tags pushed by the default GITHUB_TOKEN do not trigger publish.yml, so a separate identity is needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a manual (
workflow_dispatch) release that publishes every package whose pubspec version is not yet on pub.dev, in dependency order, skipping already-published versions. Ported from the solidartrelease.yaml+scripts/release.shsetup.Files
.github/workflows/release.yaml— manual trigger with adry_runboolean input. Checks out full history/tags and runs the orchestrator withsecrets.RELEASE_PAT.scripts/release.sh— for each publishable package (solid_annotations→solid_generator, dependency order):version:from the pubspec (source of truth — does not bump versions),<name>-v<version>(marked--prereleasefor pre-release versions, with CHANGELOG notes), which triggers the existingpublish.yml,Prerequisite
Requires a
RELEASE_PATrepo secret (fine-grained PAT with Contents: write, or a GitHub App token).publish.ymltriggers onpush: tags, and tags created by the defaultGITHUB_TOKENdo not trigger other workflows — so a separate identity is required.How to run
Run the workflow with
dry_run: truefirst to preview the plan (current tags would besolid_annotations-v3.0.0-dev.1andsolid_generator-v3.0.0-dev.1, both prereleases), then re-run withdry_run: falseto release.Validation
bash -n scripts/release.sh— no syntax errors3.0.0-dev.1